package com.zhaogang.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zhaogang.dao.SaleSettleinfoMapper;
import com.zhaogang.dto.SaleSettleDetailDTO;
import com.zhaogang.entity.SaleSettleinfo;
import com.zhaogang.service.SaleSettleinfoService;

@Service
public class SaleSettleinfoServiceImp implements SaleSettleinfoService {
	@Resource 
	private SaleSettleinfoMapper settleinfoMapper;

	public int insert(SaleSettleinfo settleinfo) {
        return   settleinfoMapper.insert(settleinfo);
	}

	public List<SaleSettleinfo> selectInfoList(SaleSettleinfo record) {
		return settleinfoMapper.selectInfoList(record);
	}

	public SaleSettleinfo selectByPrimaryKey(Integer id) {
		SaleSettleinfo saleSettleinfo = settleinfoMapper.selectByPrimaryKey(id);
		return saleSettleinfo;
	}

	public List<SaleSettleDetailDTO> queryListForApplyDetail() {
		List<SaleSettleDetailDTO> list = settleinfoMapper.queryListForApplyDetail();
		return list;
	}

	public SaleSettleinfo selectByAccountId(Integer accountId) {
		SaleSettleinfo  saleSettleinfo = settleinfoMapper.selectByAccountId(accountId);
		return saleSettleinfo;
	}

	public int updateState(SaleSettleinfo record) {
		
		return settleinfoMapper.updateState(record);
	}
	
	public int updateById(SaleSettleinfo record){
		return settleinfoMapper.updateByPrimaryKey(record);
	}

}
